Python Installation Windows

This chapter provides installation information on eCognition's embedded API and the external Python package.

Concept - Embedded Python API

eCognition provides support for the execution of Python programs. The implementation is based on Python Version 3.10.11 (Python Software Foundation, https://www.python.org/) and offers the ability to perform image analysis, data management and more tasks using Python scripts.

Prerequisite

To use Python scripts in eCognition you need a valid eCognition Developer license and the latest eCognition License Server.

During setup of eCognition activate the check box Python Support so that the programming language Python is installed:


eCognition setup - Python Support

The eCognition installation comprises the following python libraries/packages:

Available packages can be listed and new packages added using eCognitions' Environment manager accessible via Tools > Manage Python Environments(see User Guide > Python Integration).

eCognition uses venv for virtual environment management, that creates isolated Python environments for Python libraries/packages. Each environment can contain different packages. eCognition's Python installation is separate and independent from your local or main system installation (see https://docs.python.org/3.9/library/venv.html).

 

See also:

Reference Book > Algorithms and Processes > Miscellaneous > Python Script - description algorithm and its parameters

Reference Book > Algorithms and Processes > Miscellaneous > Embedded Python API Reference - reference for each class, properties and methods

User Guide > Python Integration - application examples for python scripts

Installation Guide > Linux > Python Installation - installation and setup for Linux

Concept - External Python package

Installation files for external Python API - eCognition wheel packages

Python versions supported for the ecognitionapi are versions 3.8 to 3.12.

Commands for installation of wheel packages:

To control eCognitions configuration:

  1. LM_LICENSE_FILE
    This file sets the license file location (*.lic) or the license server name of the IP address based on "port@myServerIP".
    The port can be skipped using "@myServerIP" - in this case the default port 27000 is used.
    Example: os.environ["LM_LICENSE_FILE"] = "@myServerName"

  2. eCognition.cfg
    All configuration options from the default eCognition.cfg file can be overridden with environment variables, by following this syntax:
    ECOG_CONFIG_{config-group}="key1=value1;key2=value2;.."
    Example: os.environ["ECOG_CONFIG_logging"]="trace level=Detailed"
    (set log file location and trace level - this overrides appropriate <logging> values in eCognition.cfg)

 

See also:

Python Package Documentation - External API